package org.wheel.quartz.repositories;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.wheel.jpa.repository.BaseRepository;
import org.wheel.quartz.domain.QuartzLog;

import java.util.Map;

public interface QuartzLogRepository extends BaseRepository<QuartzLog, Long> {

    /**
     * 查询任务日志
     * @param name
     * @param group
     * @param pageable
     * @return
     */
    Page<QuartzLog> findQuartzLogsByNameAndGroupOrderByStartTimeDesc(String name, String group, Pageable pageable);

    /**
     * 查询任务
     * @param params
     * @param pageable
     * @return
     */
    Page<Map<String, Object>> findAllJobs(Map<String, Object> params, Pageable pageable);

}
